<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<script type="text/javascript">

$(document).ready(function(){
	$("#suchNameF").submit(function(event){
		
		$.ajax({
			type : "post",
			url : "${initParam.root}/suchMember.do",
			data:$(this).serialize(),
			datatype:"json",
			success:function(data){
				var str="";
				if(data.flag==false)
					{
					
						str="해당하는 사용자가 없습니다";
					}
				else if(data.flag==true)
					{
					
						str=data.mvo.id;
					}
				
	    var loginBox = $("#resultdiv");
	            $("#resultFormp").html(str);
	            

	    //Fade in the Popup
	    $(loginBox).fadeIn(300);
	    
	    //Set the center alignment padding + border see css style
	    var popMargTop = ($(loginBox).height() + 24) / 2; 
	    var popMargLeft = ($(loginBox).width() + 24) / 2; 
	    
	    $(loginBox).css({ 
	        'margin-top' : -popMargTop,
	        'margin-left' : -popMargLeft
	    });
	    
		
		
		
	}
});
	event.preventDefault();
});//submit




	
});

</script>


<a href="#" class="close"><img src="${initParam.root }/image/close_pop.png" class="btn_close" title="Close Window" alt="Close" /></a>
 
<h1>아이디 찾기</h1>
  <form id= "suchNameF"  class="signin" >
        <fieldset class="textbox">
        <label class="username">
        <span>SSn</span>
        <input id="ssn" name="ssn"  type="password" autocomplete="off" placeholder="User SSn">
        </label>
        <button class="submit button" type="submit">찾기</button>
           
        </fieldset>
        
<input type="hidden" name="method" value="id">
  </form>
  
  <div id="resultdiv" class="suchresult-popup">
  <a href="#" class="close"><img src="${initParam.root }/image/close_pop.png" class="btn_close" title="Close Window" alt="Close" /></a>
   <form id= "resultForm"  class="signin" >
        <fieldset class="textbox">
        <label class="username">
        <span>검색결과</span>
        <p id="resultFormp"></p>
        </label>
              
        </fieldset>
        
<input type="hidden" name="method" value="id">
  </form>
  </div>
